<form (ngSubmit)="submit()">
    <header>
        <div class="left">
            <a routerLink="/tabs/settings">
                <span class="header-icon" aria-hidden="true"><i class="fa fa-chevron-left"></i></span>
                <span>{{'back' | i18n}}</span>
            </a>
        </div>
        <div class="center">
            <span class="title">{{'exportVault' | i18n}}</span>
        </div>
        <div class="right">
            <button id = "submit" appBlurClick type="submit">{{'submit' | i18n}}</button>
        </div>
    </header>
    <content>
        <div class="box">
            <div class="box-content">
                <div class="box-content-row" appBoxRow>
                    <input id = "file" type="file" accept=".csv,.json" (change) = "onFileSelected($event.target.files[0])">
                </div>
                <div class="box-content-row box-content-row-flex" appBoxRow>
                    <div class="row-main">
                        <label for="masterPassword">{{'masterPass' | i18n}}</label>
                        <input id="masterPassword" type="{{showPassword ? 'text' : 'password'}}" name="MasterPassword"
                            class="monospaced" [(ngModel)]="masterPassword" required appInputVerbatim appAutofocus>
                    </div>
                    <div class="action-buttons">
                        <a class="row-btn" href="#" appStopClick appBlurClick
                            appA11yTitle="{{'toggleVisibility' | i18n}}" (click)="togglePassword()">
                            <i class="fa fa-lg" aria-hidden="true"
                                [ngClass]="{'fa-eye': !showPassword, 'fa-eye-slash': showPassword}"></i>
                        </a>
                    </div>
                </div>
            </div>
            <div class="box-footer">
                <p>{{'exportMasterPassword' | i18n}}</p>
            </div>
        </div>
    </content>
</form>
